﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title>学生惠后台管理系统</title>
    <link rel="stylesheet" href="/App/Admin/public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/style.css"/>
</head>
<body>
<div class="mainBody">
    
  <include file="Public:left"/>
    <div class="main">
        <include file="Public:top"/>

        <div class="subNav">
            <span class="text"><i class="iconFont">&#xe600;</i>区域管理 - 编辑</span>
        </div>

        <div class="indexBox">
            <div class="con-det">
                <div class="row">
                    <div class="col-md-12">
                       
                            <form action="{:U('Area/saveEdit')}" method="post"  id="commentForm" >
                            <input type="hidden" id="updateid"  name="school_id"value="{$dataInfo.id}">
                            <table class="formTable editForm">
                                <tr>
                                    <td class="noBor" valign="top">省</td>
                                    <td class="noBor" valign="top">
                                       
                                         <select  id="select_id5" class="inp form-control" name="select_name5">
                                            <option selected="selected" value=''>请选择</option>
                                            <foreach name='listAddress'  item='item'>
                                            <option value="{$item['id']}"   <if condition="$item['id'] eq $dataInfo['pro_id']"> selected </if> >{$item['name']}</option>
                                            </foreach>
                                        </select>
                                        
                                        
                                    </td>
                                    <td class="noBor"></td>
                                    <td class="noBor" valign="top">市</td>
                                    <td class="noBor" valign="top">
                                     <select id="select_id6"  class="inp form-control" name="select_name6">
                                            <foreach name='listAddressCity'  item='item'>
                                            <option value="{$item['id']}"   <if condition="$item['id'] eq $dataInfo['city_id']"> selected </if> >{$item['name']}</option>
                                            </foreach>
                                        </select>
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">大学</td>
                                    <td valign="top">  <input type="text" name="school" id="school01" class="inp form-control" value="{$dataInfo.name}"></td>
                                   
                                    <td colspan="3"></td>
                                </tr>
                                <tr>
                                    <td class="textAliRi" colspan="5">
                                        <button class="btn btn-primary blue" type="submit">保存</button>
                                        <a href=""{:U('Area/index')}" class="btn btn-default" type="button"> 返回</a>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/PCASClass.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/public.js"></script>
<script>
    new PCAS("Province","City","辽宁省","沈阳市")
</script>


<script type="text/javascript">
	$('.btn-primary').on('click',function(){
	   var school01 = $('#school01').val();
        
          if( school01 == ''){
               alert("大学不能为空");
                   return false;
               }
    

    
	
	});
</script>

<script>
$("#select_id5").change(function(){
var checkValueOne=$("#select_id5").val();
var updateid=$("#updateid").val(); //获取Select选择的Value
 $.post('{:U('Area/select_address')}',{checkValueOne:checkValueOne,updateid:updateid},function(data){
               $("#select_id6").text(' ');
               $("#select_id6").append(data);
            
        });
});
</script>


</body>
</html>








